

class 数字类():
  print(
    bin(12),
    oct(12),
    hex(12),
  )

  print(
    bool(''),
    bool('1'),
    bool(0),
    bool(1),
    bool(-1),
    bool(()),
    bool((1)),
    bool([]),
    bool([1]),
    bool({}),
    bool({1}),
    bool({'name':'wyl350'}),
  )

  print('='*100)

  print(
    int('0'),
    int(True),
    int(False),
  )
  print('====')
  print(
    float(1),
    float(False),
    float(True),
    float('111'),
  )
  print('='*100)

  print(
    abs(1),
    abs(-1),
  )

  print(
    divmod(100, 9)
  )

  print(
    round(2.1),
    round(2.4),
    round(2.5),
    round(2.6),
    round(2.9),
  )

  print(
    pow(9,2),
    sum([1,2,3,4]),
    min([1,2,3,4]),
    max([1,2,3,4]),
  )

class 序列:
  print('='*50)
  print(
    list((1,2,3)),
    list([1,2,3]),
    list({1,2,3}),
  )
  print(
    tuple((1,2,3)),
    tuple([1,2,3]),
    tuple({1,2,3}),
  )
  print(
    set((1,2,3)),
    set([1,2,3]),
    set({1,2,3}),
  )
  print('=')
  
  # tuple1 = (1,2,3)
  # reversed(tuple1, reversed=False)

  # print(
  #   tuple1
  #   # reversed([1,2,3]),
  #   # reversed({1,2,3}), # 这个会发生错误，因为 set 是不能够 反转顺序的
  # )

  # tuple1 = [1,2,3]
  # print(
  #   reversed(tuple1)
  # )

  # print(
  #   # (1,2,3)[1,1,1]
  #   tuple1[1,2]
  # )


class 排序():
  print(
    len({1,2,3}),
    len([1,2,3]),
    len((1,2,3)),
    len(
      {
        'age':11,
        'class': 'grade1'
      }
    ),
  )

